import { createSlice } from "@reduxjs/toolkit"

const mainStore = createSlice({
    name: "main",
    initialState: {
        headerConfig: {
            isFixed: false,
        }
    },
    reducers: {
        changeHeaderConfig(state, action) {
            state.headerConfig = action.payload
        }
    }
})
// 按需导出
export const {
    changeHeaderConfig
} = mainStore.actions
// 导出整个reducer
export default mainStore.reducer